Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
MSSQL
1) Aggregate Functions
2) Analytical Functions
3) Constraints
4) Cursor
5) Data Set
6) Data Type
7) Database
8) Date Timezone
9) Index
10) Insert Delete Update
11) Math Functions
12) Select Query
13) Sequence
14) Store Procedure Function
15) String Functions
16) Subquery
17) System
18) Table
19) Table Joins
20) Transact SQL
21) Transaction
22) Trigger
23) View
24) XML
Date Timezone
1) Add 12 minutes to 24th March 1964
2) Adding to a Date Using the Addition Operator
3) Combine DateADD and DateDIFF to get the last date of a month
4) Combine the CONVERT()and the DATEADD() functions to format a return date value nine months before September 8, 1989
5) CONVERT date to varchar
6) CONVERT(VarChar(50), GETDATE(), 100)
7) CONVERT(VarChar(50), GETDATE(), 101)
8) CONVERT(VarChar(50), GETDATE(), 102)
9) CONVERT(VarChar(50), GETDATE(), 103)
10) CONVERT(VarChar(50), GETDATE(), 104)
11) CONVERT(varchar, getdate(), 1(2,3,4,5,6))
12) CONVERT(varchar,GETDATE(),108) hh
13) CONVERT(varchar,GETDATE(),113) dd Mmm yyyy hh
14) CONVERT(varchar,GETDATE(),114) hh
15) Converted to a datetime
16) DATEADD
17) DATEADD(Day, 90, 4-29-1988)
18) DATEADD(mi, -9000000, 4-29-1988 10
19) DATEADD(second, 9000, 4-29-1988 10
20) DATEADD(year, 18, 4-29-1988 10
21) DATEADD(yy, -18, 4-29-1988 10
22) DATEDIFF
23) DATEDIFF(d, @thisdate, @nextmonth) Days between
24) DATEDIFF(day, 9-8-1989, 10-17-1991)
25) DATEDIFF(m, 24 March 2001,24 March 1964)
26) DATEDIFF(mi, 24 March 2001,24 March 1964)
27) DATEDIFF(month, 9-8-1989, 10-17-1991)
28) DATEDIFF(ss, @MyBirthDate, GETDATE())
29) DATEDIFF(wk, 24 March 2001,24 March 1964)
30) DATEDIFF(yyyy, 24 March 2001,24 March 1964)
31) DATENAME
32) DATENAME returns the part of the date in a literal form
33) DATENAME(month, 4-29-1988) returns a string containing the descriptive name
34) DATEPART
35) DATEPART(dw,GETDATE())
36) DATEPART(m,GETDATE())
37) DATEPART(mi,GETDATE())
38) DATEPART(month, 4-29-1988)
39) DATEPART(n,GETDATE())
40) DATEPART(wk,GETDATE())
41) DATEPART(yy,GETDATE())
42) Dateparts and Abbreviations
43) DATETIME column
44) DAY
45) Day(Date) function
46) Declare an int variable and use it in select statement
47) Difference between the current time and UTC
48) Difference in weeks between 7-2-1996 and 8-4-1997
49) Evaluating Whether An Expression Is a Date or Is Numeric
50) Find out the month name in two months time
51) Find the number of days between 24th March 2001 and 24th March 1964
52) Format date
53) Get current date in procedure
54) Get Day only from a datetime variable
55) GETDATE
56) GETDATE()
57) GETUTCDATE
58) GETUTCDATE()
59) MONTH
60) Month(Date) function
61) Passing a column name to the DATEDIFF() value argument
62) Reference Date data type as string (char)
63) Returning the Current Date and Time by using CURRENT_TIMESTAMP
64) SELECT DATEADD(dayofyear, 18, 4-29-1988 10
65) SELECT DATEADD(hh,12,24 March 1964)
66) SELECT DATEADD(m,12,24 March 1964)
67) SELECT DATEADD(mi, -30, 2005-09-01 23
68) Select DATEADD(month, -1, 2002-09-30 11
69) SELECT DATEADD(quarter, 18, 4-29-1988 10
70) SELECT DATEADD(wk,12,24 March 1964)
71) SELECT DATEADD(yy,12,24 March 1964)
72) Select DATEDIFF(hour, 06
73) Select DATEDIFF(minute, 06
74) Select DATEDIFF(quarter, 2001-12-01, 2002-09-30)
75) Select DATEDIFF(second, 06
76) Select DATENAME(day, 2002-09-30 11
77) Select DATENAME(dayofyear, 2002-09-30 11
78) Select DATENAME(hour, 2002-09-30 11
79) Select DATENAME(minute, 2002-09-30 11
80) Select DATENAME(quarter, 2002-09-30 11
81) Select DATENAME(second, 2002-09-30 11
82) Select DATENAME(week, 2002-09-30 11
83) Select DATENAME(weekday, 2002-09-30 11
84) Select DATENAME(year, 2002-09-30 11
85) Select DATEPART(dayofyear, 2002-09-30 11
86) Select DATEPART(quarter, 2002-09-30 11
87) Select DATEPART(week, 2002-09-30 11
88) Select DATEPART(weekday, 2002-09-30 11
89) Select DAY(2002-09-30)
90) SELECT ISDATE(112000)
91) Select ISDATE(2002-09-30)
92) Select ISDATE(2002-09-31)
93) Select ISDATE(23
94) Select MONTH(2002-09-30)
95) Select YEAR(2002-09-30)
96) The DAY(), MONTH(), and YEAR() Functions
97) Update the record with the current data and time using the GETDATE() function
98) Using Functions in Queries
99) Using the DATENAME() Function
100) YEAR